/*
created by nobles0ul on 27th sept
copyright (c) all rights reserved
*/


#include<iostream>
#include<cstdlib>
#include<string>

using namespace std;

class university
{
string name,type;
int subject,classes;
public:
university(string n,string t):name(n),type(t)
{}
university(string n,int sub,int cla,string t):name(n),type(t),subject(sub),classes(cla)
{}
virtual void display()
{
cout<<"this extends over";
}
string name1()
{
return name;
}

};


class formal:public university
{
public:
formal(string name,int s,int d):university(name,s,d,"formal")
{};

void display()
{
cout<<"Formal parameter";
}

};


class research:public university
{
public:
research(string n):university(n,"research")
{};
void display()
{
cout<<"Research class";
}

};


int main()
{

university *u[2];
formal f("mayank",2,3);
u[1]=&f;
cout<<u[1]->name1();
cout<<"\n";
research r("bhola");
cout<<"\n";
u[2]=&r;
cout<<u[2]->name1();
cout<<"\n";

return 0;
}
